Skip to content

add support for remote write in tsdb - #11

Merged
agavra merged 1 commit into
mainfrom
remote_write
Dec 18, 2025
Merged

add support for remote write in tsdb#11
agavra merged 1 commit into
mainfrom
remote_write

Conversation

@agavra

@agavra agavra commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR adds implementation of the p8s remote write protocol in order to run https://github.com/VictoriaMetrics/prometheus-benchmark against tsdb. In order to avoid requiring protobuf dependencies I flagged it behind a rust config.

Test Plan

Unit tests and manually tested using a python script:

> python3 test_remote_write.py http://localhost:9090
/Users/agavra/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Testing Remote Write to http://localhost:9090/api/v1/write
Timestamp: 1766091874754ms (2025-12-18 13:04:34)
Protobuf size: 151 bytes
Compressed size: 131 bytes
Response status: 204
Success! Metrics ingested.

Query your data with:
  curl 'http://localhost:9090/api/v1/query?query=test_metric'


> curl 'http://localhost:9090/api/v1/query?query=test_metric' | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   171  100   171    0     0  30180      0 --:--:-- --:--:-- --:--:-- 34200
{
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
      {
        "metric": {
          "__name__": "test_metric",
          "env": "test",
          "instance": "localhost:9090"
        },
        "value": [
          1766091874.754,
          "42"
        ]
      }
    ]
  }
}

Checklist

  • Tests added/updated
  • cargo fmt and cargo clippy pass
  • Documentation updated (if applicable)

@agavra
agavra merged commit 1c79821 into main Dec 18, 2025
1 check passed
@agavra
agavra deleted the remote_write branch December 19, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant